package com.bwhx.eruler.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.bwhx.eruler.bean.FleeRuler;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.dao.FleeRulerDao;

@Repository
public class FleeRulerDaoImpl extends BaseDaoImpl<FleeRuler> implements FleeRulerDao {
	
	public FleeRulerDaoImpl() {
		this.setNs("com.bwhx.eruler.mapper.FleeRulerMapper.");
	}

	@Override
	public List<FleeRuler> list(Page p) {
		return getSqlSession().selectList(this.getNs() + "list",p);
	}

	@Override
	public Integer count(FleeRuler fr) {
		Object selectOne = getSqlSession().selectOne(this.getNs() + "count",fr);
		if(null!=selectOne && selectOne instanceof Integer){
			return (int)selectOne;
		}
		return 0;
	}

	
}
